<ul id="${id}" name="${id}">
    @for(item in list){
    <div style="display: inline-block;width: 700px">
        <div style="display: inline-block;width: 130px">
            <input type="checkbox" id="checkbox${item.id}" name="checkbox${item.id}" value="${item.payServicePrice}"/>
            <div class="btn-group btns" role="group" aria-label="...">
                <button type="button" class="btn btn-default reduce${item.id}" id="reduce${item.id}">-</button>
                <button type="button" class="btn btn-default num${item.id}" id="num${item.id}">0</button>
                <button type="button" class="btn btn-default add${item.id}" id="add${item.id}">+</button>
            </div>
        </div>
        ${item.payServiceName}&nbsp;&nbsp;${item.payServicePrice}元
    </div>
    <script>
        var totle = 0.00;
        document.getElementById('checkbox${item.id}').onclick = function () {
            if (this.checked) {
                totle += parseFloat(document.getElementById("checkbox${item.id}").value) * parseInt(numtxt${item.id}.innerText);
                document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
            } else {
                totle -= parseFloat(document.getElementById("checkbox${item.id}").value) * parseInt(numtxt${item.id}.innerText);
                document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
            }
        }
        var add${item.id} = document.getElementsByClassName('add${item.id}')[0];    //加
        var reduce${item.id} = document.getElementsByClassName('reduce${item.id}')[0];  //减
        var numtxt${item.id} = document.getElementsByClassName('num${item.id}')[0];  //数
        var num${item.id} = numtxt${item.id}.innerText;  //数量
        add${item.id}.onclick = function () {
            num${item.id}++;
            numtxt${item.id}.innerHTML = num${item.id};
            if (document.getElementById('checkbox${item.id}').checked) {
                totle += parseFloat(document.getElementById("checkbox${item.id}").value);
                document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
            } else {
                totle = totle;
                document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
            }
        };
        reduce${item.id}.onclick = function () {
            if (num${item.id} <= 0) {
                num${item.id} = 0;
                totle = totle;
                document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
            } else {
                if (document.getElementById('checkbox${item.id}').checked) {
                    totle -= parseFloat(document.getElementById("checkbox${item.id}").value);
                    document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                    document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
                } else {
                    totle = totle;
                    document.getElementById("totalAmount").innerHTML = "总金额：" + totle.toFixed(2) + "";
                    document.getElementById("totalAmounts").value = "" + totle.toFixed(2) + "";
                }
                num${item.id}--;
            }
            numtxt${item.id}.innerHTML = num${item.id};
        };
    </script>

    @}
</ul>
@if(isNotEmpty(underline) && underline == 'true'){
<div class="hr-line-dashed"></div>
@}


